Recently, information storage devices based on a non-volatile memory, such as a flash memory, have been widely applied to computer platforms and portable devices. Such a device is regarded as a substitute for an information storage device based on magnetic disk memory, serving as a storage medium of a computer for storing operating systems and data files.
A flash memory differs with a magnetic disk memory in that the magnetic disk memory has the ability of random data access. In order to overwrite data in the flash memory, existing data must be deleted first. In other words, as for a flash memory having a number of memory cells, the memory cells should be returned to an initial state by erasing data stored therein. Besides, in order to modify data stored in a memory cell, a number of steps are required, such as the steps of reading the stored data in the memory cell, modifying the read data, and writing the modified data in an empty memory cell of the flash memory.
Due to the above mentioned characteristics, a mapping table is usually used to manage the flash memory. The mapping table can be referred to as a table that associates a logical address with a physical address. In practice, the logical address requested to read or write is changed into a physical address with reference to the mapping table, and data in the corresponding physical address of the flash memory is read or written. However, the mapping table may result in incorrect data access when power of the flash memory is suddenly cut-off. In other words, mapping table may fail in correctly associating the logical address with the physical address in the event of power failure or improper behaviors to power off the flash memory, thereby lowering the stability of the information storage device based on a flash memory.
There is provided an approach to enhance the stability for the flash memory, in which a mapping table is produced and corrected by scanning the entire flash memory when an information storage device based on the flash memory is booted. This approach, however, consumes lots of time in scanning the entire the flash memory, thereby reducing the efficiency of managing the flash memory. Therefore, it is a subject of the industrial endeavors to manage the flash memory with high efficiency and stability.